{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<body>
  <nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
   
    彩票管理
    <span class="c-gray en">&gt;</span>
    彩种列表
    <a class="btn btn-success radius r"
      style="line-height: 1.6em; margin-top: 3px"
      href="javascript:location.replace(location.href);" title="刷新">
      <i class="Hui-iconfont">&#xe68f;</i>
    </a>
  </nav>

<div style="padding:20px;height:30px;">
  	
  	<div class="new_box">

     <div class="page-container" style="padding-top:10px;">
      <div id="tab-system" class="HuiTab">
        <div class="tabCon">
          <div class="mt-20">
            <table
              class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
              <thead>
                <tr class="text-c">
                  <th>ID</th>
                  <th>彩种名字</th>
                  <th>自定义名字</th>
                  <th>彩票备注</th>
                  <th>彩票期数</th>
                  <th>封盘时间</th>
                  <th>手机排序</th>
                  <th>电脑排序</th>
                  <th>手机热门推荐</th>
                  <th>电脑热门推荐</th>
                  <th>开关</th>
                </tr>
                
              </thead>
              {volist name="list" id="DL"}
              <tbody>
              
                <tr class="text-c">
                  <td>{$DL.id}</td>
                  <td>{$DL.cp_name_old}</td>
                  <td>
                    <input name='cp_name_new_{$DL.id}' value='{$DL.cp_name_new}' style='font-size:12px; text-align:center; width:80px' onchange="updateCpInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}" />
                  </td>
                  <td>
                    <input name='remark_{$DL.id}' value='{$DL.remark}' style='font-size:12px; text-align:center; width:80px' onchange="updateCpInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}" />
                  </td>
                  <td>
                    <input name='num_day_{$DL.id}' value='{$DL.num_day}' style='font-size:12px; text-align:center; width:80px' onchange="updateCpInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}" />
                  </td>
                   <td>
                     <input name='cp_fp_time_{$DL.id}' value='{$DL.cp_fp_time}' style='font-size:12px; text-align:center; width:50px' onchange="updateCpInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}" />
                   </td>
                   <td>
                     <input name='cp_mb_px_{$DL.id}' value='{$DL.cp_mb_px}' style='font-size:12px; text-align:center; width:50px' onchange="updateCpInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}" />
                   </td>   
                   <td>
                     <input name='cp_dn_px_{$DL.id}' value='{$DL.cp_dn_px}' style='font-size:12px; text-align:center; width:50px' onchange="updateCpInfo(this.value,this.name)" onkeypress="if(event.keyCode == 13){ blur()}" />
                   </td> 
                   <td>
                   <a href='/admin/lottery/cz_status?id={$DL.id}&dat=mb&page={$page}'>{$DL.cp_mb_index==1 ? '是' : '否'}</a>
                   </td> 
                   <td>
                   <a href='/admin/lottery/cz_status?id={$DL.id}&dat=dn&page={$page}'>{$DL.cp_dn_index==1 ? '是' : '否'}</a>
                   </td> 
                   <td>
                      <span >{$DL.cp_if_open==1 ? '已开启' : '已关闭'}</span>&nbsp;&nbsp;&nbsp;&nbsp;

                      <a style="color: red;cursor:pointer;width:25px;background-color: #cccccc;padding:0 5px;border-radius: 5px;" href='/admin/lottery/cz_status?id={$DL.id}&dat=open&page={$page}'>{$DL.cp_if_open==1 ? '关' : '开'}</a>
                   </td> 
                </tr>
              {/volist}
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    </div>
    </div>

{/block}{block name="js"}
 <script type="text/javascript" src="__SYSMET__/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript">
    $(function() {
  $('.skin-minimal input').iCheck({
    checkboxClass : 'icheckbox-blue',
    radioClass : 'iradio-blue',
    increaseArea : '20%'
  });
  $("#tab-system").Huitab({
    index : 0
  });
});
</script>
<script type="text/javascript">
function updateCpInfo(value,name) {
	$.ajax({
        type : "post",
        url : "{:url('lottery/updateCpInfo')}",
        data : {"name":name,"value":value},
        success: function (data) {
        	if(!data) {
        		alert("更新失败请重试！");
        	} else {
        		alert("更新成功");
        	}
        }
    });
}
</script>
{/block}
